Conversation
| - `blockHash`: `DATA`, 32 Bytes | ||
| - `transactions`: `Array of DATA` - Array of transaction objects, each object is a byte list (`DATA`) representing `TransactionType || TransactionPayload` or `LegacyTransaction` as defined in [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) | ||
| - `withdrawals`: `Array of WithdrawalV1` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure. | ||
| - `withdrawals`: `Array of WithdrawalV1|null` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure. |
There was a problem hiding this comment.
| - `withdrawals`: `Array of WithdrawalV1|null` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure. | |
| - `withdrawals`: `(Array of WithdrawalV1) | null` - Array of withdrawals, each object is an `OBJECT` containing the fields of a `WithdrawalV1` structure. |
A nit: it may read as null values are allowed in the array.
There was a problem hiding this comment.
You think this is necessary? I wouldn't mind it's just that the way it is currently written is consistent with everywhere else in the document.
There was a problem hiding this comment.
I don't insist if it reads as intended for everyone
|
As an alternative, we can spec |
strongly against this as it makes the definitions of the objects more complex for client implementors |
What do you mean? We have a rough agreement that engine_newPayloadV2Request
ResponseRefer to the response for engine_newPayloadV1. SpecificationThis method follows the same specification as engine_newPayloadV1. The above does look clearer to me than what we currently have in the spec. I am still against abusing |
Kind of let this fall off the radar. When I originally wrote that I was thinking that it is trivial to deserialize optional fields in most languages. For example, in Rust, if a field is an Having a structure that deserialize to two different structures (an enum) often involves writing extra code. After thinking about it for a while, I'm not sure yet if this would be necessary. I have to think about the definitions of:
to determine if this actually poses as much of an issue as I thought. Were you thinking we would also define |
My intention is to keep the spec clear about which version of a datastructure should be used given the context, and how API must respond when the version is incorrect. Client implementation may utilise JSON fields' optionality and use one structure for each or a part of a version set.
I would do it exactly the same way as with |
|
The change discussed above is proposed by #337 |
Sounds good. I'll close this PR and we can go with that one. |
No description provided.